package com.booking.service;

import com.booking.common.dto.PageReq;
import com.booking.common.dto.PageResp;
import com.booking.controller.model.req.order.OrderPageQueryReq;
import com.booking.controller.model.req.order.RoomOrderCancelReq;
import com.booking.controller.model.req.order.RoomOrderCommentReq;
import com.booking.controller.model.req.order.RoomOrderCreateReq;
import com.booking.controller.model.req.order.ServiceOrderCancelReq;
import com.booking.controller.model.req.order.ServiceOrderCommentReq;
import com.booking.controller.model.req.order.ServiceOrderCreateReq;
import com.booking.controller.model.res.RoomOrderDetail;
import com.booking.controller.model.res.ServiceOrderDetail;
import com.booking.dao.entity.RoomOrder;
import com.booking.dao.entity.ServiceOrder;

/**
 * @author Qikai.Lin
 * @date 2023/4/23
 */
public interface OrderService {
    /* ----------------------房间订单---------------------- */

    /**
     * 分页查询房间订单
     * @param request
     * @return
     */
    PageResp<RoomOrderDetail> getRoomOrderPage(PageReq<OrderPageQueryReq> request);


    /**
     * 查询房间订单详情
     * @param orderId
     * @return
     */
    RoomOrderDetail getRoomOrderDetail(Long orderId);

    /**
     * 创建房间订单
     * @param request
     */
    RoomOrder createRoomOrder(RoomOrderCreateReq request);

    /**
     * 取消房间订单
     * @param request
     */
    void cancelRoomOrder(RoomOrderCancelReq request);

    /**
     * 终止房间订单
     * @param orderId
     */
    void shutdownRoomOrder(Long orderId);

    /**
     * 评论房间订单
     * @param request
     */
    void commentRoomOrder(RoomOrderCommentReq request);

    /**
     * 房间入住
     * @param orderId
     */
    void checkRoomOrder(Long orderId);

    /**
     * 完成房间订单
     * @param orderId
     */
    void finishRoomOrder(Long orderId);

    /**
     * 支付房间订单定金
     * @param orderId
     */
    void payRoomOrderBooking(Long orderId);

    /**
     * 支付房间订单
     * @param orderId
     */
    void payRoomOrder(Long orderId);
    /* ----------------------服务订单---------------------- */
    PageResp<ServiceOrderDetail> getServiceOrderPage(PageReq<OrderPageQueryReq> request);
    ServiceOrderDetail getServiceOrderDetail(Long orderId);

    ServiceOrder createServiceOrder(ServiceOrderCreateReq request);

    void cancelServiceOrder(ServiceOrderCancelReq request);

    /**
     * 终止房间订单
     * @param orderId
     */
    void shutdownServiceOrder(Long orderId);

    void commentServiceOrder(ServiceOrderCommentReq request);

    void payServiceOrderBooking(Long orderId);

    void payServiceOrder(Long orderId);

    void finishServiceOrder(Long orderId);
}
